
(in-package #:lilu-emacs-examples)

(defun test-edit ()
  (lilu-emacs:emacs-edit "a.txt" :wait-closed-p t)
  (lilu-emacs:emacs-edit "a.txt" :wait-closed-p nil)
  (lilu-emacs:emacs-edit "a.txt" :create-frame-p t))

(defun test-eval ()
  (lilu-emacs:emacs-eval "(sleep-for 1)" :server-name "pippo" :ensure-server-p nil :error-p nil)
  (lilu-emacs:emacs-eval "(sleep-for 1)" :server-name "pippo" :ensure-server-p nil))

(defun test-error ()
  (lilu-emacs:emacs-eval "(sleep-fo 1)" :error-p nil)
  (lilu-emacs:emacs-eval "(sleep-fo 1)" :wait-p nil)
  (lilu-emacs:emacs-eval "(sleep-fo 1)"))

(defun test-wait ()
  (lilu-emacs:emacs-eval "(sleep-for 1)")
  (lilu-emacs:emacs-eval "(sleep-for 1)" :wait-p nil))

(defun test-debugger ()
  (let ((*debugger-hook*
          lilu-emacs:*default-emacs-debugger-hook*))
    (eval '(+ 3 4 a))))
